﻿@model IEnumerable<string>
@{
    Layout = null;
}

<ul id="memberselectul" style="">
    @foreach (var x in Model)
    {
        <li>
            <input type="checkbox" name="cbmember" value="@x" />@x
        </li>
    }
</ul>
<p style="margin-top: 20px; text-align: right;">
    <button onclick="okmember()" class="t-button">确定</button>
    <button onclick="closemember()" class="t-button">取消</button>
</p>


<style>
    #memberselectul { overflow: auto; padding: 0; text-decoration: none; list-style: none; }
    #memberselectul li { width: 130px; float: left; margin: 5px; list-style: none; }
</style>

<script>
    function closemember() {
        var window = $("#GetMembers").data("tWindow");
        window.close();
    }

    function okmember() {
        var checks = "";
        $("input[name='cbmember']").each(function () {
            if (this.checked) {
                if (checks.length > 0)
                    checks += ";" + $(this).val();
                else
                    checks +=  $(this).val();
            }
        });
        $("#Owners").val(checks);
        $(".oname").text(checks);
        closemember();
    }

</script>
